<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>部门表</title>
<link rel="stylesheet" type="text/css"href="ui/themes/default/easyui.css"> 
<link rel="stylesheet" type="text/css"href="ui/themes/icon.css"> 
<script type="text/javascript"src="ui/jquery.min.js"></script> 
<script type="text/javascript"src="ui/jquery.easyui.min.js"></script> 
<script type="text/javascript"src="ui/jquery.serializejson.min.js"></script> 

<!-- 引入crud.js -->
<script type="text/javascript"src="js/crud.js"></script> 


<script type="text/javascript">
	
	var name='dep';
	var columns=[[
					{field:'uuid',title:'部门编号',width:100},          
					{field:'name',title:'部门名称',width:100},
					{field:'tele',title:'部门电话',width:100},
					{
						field:'-',title:'操作',width:100,formatter:function(value,row,index){
							return " <a href='#' onclick='edit("+row.uuid+")'>修改</a> &nbsp;|&nbsp; <a href='#' onclick='dele("+row.uuid+")'>删除</a>"
						}
					}
				]];

</script>
</head>
<body>
	
	<form id="searchForm" >
		部门名称: <input name='t1.name'>
		部门电话: <input name='t1.tele'>
		<button id='btnSearch' type='button'>查询</button>  <!-- type不要写成submit否则会走两次提交 -->
	</form>

	<table id="grid"></table>
	<button type='button' onclick='test()'>测试</button>	
	
	
	<!-- 弹出的窗口 -->
	<div id='editWindow' class='easyui-window' title='部门编辑' style='width:300px;height:200px' data-options='closed:true' >
		<form id='editForm' style="padding:10px 20px 10px 40px;">
			<!-- 隐藏域  在修改时需要保存id  查询时数据回显,会进行赋值 -->
			<input type="hidden" name='t.uuid'>
	        <p>名称: <input type="text" name='t.name'></p>
	        <p>电话: <input type="text" name='t.tele'></p>
	        <div style="padding:5px;text-align:center;">
	            <a href="#" id="btnSave" class="easyui-linkbutton" icon="icon-ok" >保存</a>
	            <a href="#" class="easyui-linkbutton" icon="icon-cancel" 
	            onclick="javascript:$('#editWindow').dialog('close');$('#editForm').form('clear')">取消</a>
	        </div>
    </form>
		
	</div>	
	
	
	
	
</body>
</html>